package com.sinsz.common.bolt;

import com.alipay.sofa.rpc.config.ConsumerConfig;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Bolt实例缓存实体
 * @author chenjianbo
 */
public class Cache<T> {

    private Map<String, ProviderBean<T>> providers = new ConcurrentHashMap<>();

    private Map<String, ReferenceBean<T>> references = new ConcurrentHashMap<>();

    private Map<String, ConsumerConfig<T>> beans = new ConcurrentHashMap<>();

    public Map<String, ProviderBean<T>> getProviders() {
        return providers;
    }

    public Map<String, ReferenceBean<T>> getReferences() {
        return references;
    }

    public Map<String, ConsumerConfig<T>> getBeans() {
        return beans;
    }
}
